//package com.waste.game.mapper;
//
//import com.waste.game.entity.GameListBean;
//import com.waste.game.entity.WantBean;
//import io.swagger.models.auth.In;
//import org.apache.ibatis.annotations.*;
//
//import java.text.MessageFormat;
//import java.util.List;
//import java.util.Map;
//
//@Mapper
//public interface GameListMapper {
//    //首页倒叙查询
//    @Select("SELECT * FROM gameall ORDER BY game_uptime DESC")
//    List<GameListBean> getIndexGame();
//    //首页独立游戏点击量排序前6查询
//    @Select("SELECT id,game_title,game_img_main,game_article,game_look,game_fl,game_uptime FROM gameall WHERE game_fl='PC大作' ORDER BY game_look DESC LIMIT 6")
//    List<GameListBean> getPcLookGame();
//    //首页pc游戏点击量排序前6查询
//    @Select("SELECT id,game_title,game_img_main,game_article,game_look,game_fl,game_uptime FROM gameall WHERE game_fl='独立游戏' ORDER BY game_look DESC LIMIT 6")
//    List<GameListBean> getDlLookGame();
//    //名字模糊查询
//    @Select("select id,game_title,game_body,game_look,game_article,game_fl,game_img_main,game_uptime from gameall where game_title like concat('%',#{title},'%')")
//    List<GameListBean> getGameSearch(String title);
//    //根据id查询文章
//    @Select("SELECT * from gameall WHERE id = #{id}")
//    GameListBean getGameArt(Integer id);
//    //根据id修改文章内容
//    @Update("UPDATE gameall SET game_title=#{gameTitle},game_body=#{gameBody},game_article=#{gameArticle},game_fl=#{gameFl},video_url=#{videoUrl},game_img_main=#{gameImgMain}," +
//            "game_bot=#{gameBot},game_top=#{gameTop},game_uptime=#{gameUptime},h2_one=#{h2One},p_one=#{pOne},h2_too=#{h2Too},p_too=#{pToo},h2_tree=#{h2Tree}," +
//            "p_tree=#{pTree},game_ts=#{gameTs},img_url_one=#{imgUrlOne},img_url_two=#{imgUrlTwo},img_url_tree=#{imgUrlTree},img_url_four=#{imgUrlFour},img_url_five=#{imgUrlFive}," +
//            "img_url_six=#{imgUrlSix} WHERE id = #{id}")
//    boolean upArtBody(GameListBean gameListBean);
//    //pcgame查询
//    @Select("SELECT * FROM gameall WHERE game_fl = 'PC大作'")
//    List<GameListBean> getPcGameLIst();
//    //indexgame查询
//    @Select("SELECT * FROM gameall WHERE game_fl = '独立游戏'")
//    List<GameListBean> getIndexGameLIst();
//    //后台文章插入
//    @Insert("INSERT INTO gameall(game_title,game_download,game_look,game_uptime,game_article,game_fl,video_url,game_img_main,game_body,game_bot,game_top,h2_one,h2_too,h2_tree,p_one," +
//            "p_too,p_tree,img_url_one,img_url_two,img_url_tree,img_url_four,img_url_five,img_url_six,game_ts)VALUES(#{gameTitle},#{gameDownload},#{gameLook},#{gameUptime},#{gameArticle}," +
//            "#{gameFl},#{videoUrl},#{gameImgMain},#{gameBody},#{gameBot},#{gameTop},#{h2One},#{h2Too},#{h2Tree},#{pOne},#{pToo},#{pTree},#{imgUrlOne},#{imgUrlTwo},#{imgUrlTree}," +
//            "#{imgUrlFour},#{imgUrlFive},#{imgUrlSix},#{gameTs})")
//    boolean insertOne(GameListBean gameListBean);
//    //单独插入大字段
//    @Insert("UPDATE gameall SET game_body=#{gameBody},game_bot=#{gameBot},game_top=#{gameTop} WHERE id = #{artId}")
//    int insertOneBig(GameListBean gameListBean);
//    //文章图片插入
//    @Insert("INSERT INTO game_img(art_id,img_url_one,img_url_two,img_url_tree,img_url_four,img_url_five)" +
//            "VALUES(#{artId},#{imgUrlOne},#{imgUrlTwo},#{imgUrlTree},#{imgUrlFour},#{imgUrlFive})")
//    int insertTwo(GameListBean gameListBean);
//    //文章标题插入
//    @Insert("INSERT INTO game_body(art_id,h2_one,h2_too,h2_tree,p_one,p_too,p_tree)VALUES(#{artId},#{h2One},#{h2Too},#{h2Tree},#{pOne},#{pToo},#{pTree})")
//    int insertThree(GameListBean gameListBean);
//    //后台列表查询
//    @Select("SELECT id,game_title,game_download,game_look,game_fl,game_uptime FROM gameall")
//    List<GameListBean> getList();
//    //获取文章id
//    @Select("SELECT id FROM gameall WHERE game_title=#{gameTitle}")
//    int getArtId(String gameTitle);
//    //后台下载插入
//    @Insert("INSERT INTO game_downloadall(art_id,download_msg,download_url)VALUES(#{artId},#{downloadMsg},#{downloadUrl})")
//    boolean instDown(GameListBean gameListBean);
//
//    //想要的游戏
//    @Insert("INSERT INTO game_want VALUES(NULL,#{gameName},#{email})")
//    int gameWant(WantBean wantBean);
//    //文章下载查询
//    @Select("SELECT download_msg,download_url FROM game_downloadall WHERE art_id = #{id}")
//    List<GameListBean> getDownLoadListV(Integer id);
//
//    //后台下载列表查询
//    @Select("SELECT * FROM game_downloadall")
//    List<GameListBean> getDownListV();
//
//    //某一个下载链接查询
//    @Select("SELECT * FROM game_downloadall where art_id = #{id}")
//    GameListBean getDownOneV(Integer id);
//
//    //修改下载链接
//    @Update("UPDATE game_downloadall SET download_url=#{downloadUrl},download_msg=#{downloadMsg} WHERE art_id = #{id}")
//    boolean upDownloadOneV(GameListBean gameListBean);
//    //下载删除
//    @Delete("DELETE FROM game_downloadall WHERE id=#{id}")
//    boolean downdel(Integer id);
//    //根据id删除文章
//    @Delete("DELETE FROM gameall WHERE id = #{id}")
//    boolean delArt(Integer id);
//}
